﻿using System.Windows;
using Microsoft.Win32;

namespace Textor
{
    public partial class Window1
    {
        public Window1()
        {
            InitializeComponent();
        }

        private void OpenMenuClicked(object sender, RoutedEventArgs e)
        {
            var openFileDialog = new OpenFileDialog { Filter = "Text files (*.txt)|*.txt" };
            var dialogResult = openFileDialog.ShowDialog(this);
            if (dialogResult.Value)
            {
                textBlock.Text = System.IO.File.ReadAllText(openFileDialog.FileName);
            }
        }
    }
}
